<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BabyOS: b_trace.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="2.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BabyOS
   &#160;<span id="projectnumber">V2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b9223522bb56aee4ab59f7ba381d2163.html">bos</a></li><li class="navelem"><a class="el" href="dir_f2a2cc749b6bfcea90db6730434b0bd6.html">core</a></li><li class="navelem"><a class="el" href="dir_7991448cbe81caff9afaadef11b942e8.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">b_trace.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="b__trace_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment">/*Includes ----------------------------------------------*/</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="b__trace_8h.html">b_trace.h</a>&quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#if _CMBACKTRACE_ENABLE</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="preprocessor">#define _VERSION_S(n)   #n</span></div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="preprocessor">#define VERSION_S(n)    _VERSION_S(n) </span></div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160; </div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="keyword">const</span> <span class="keywordtype">char</span> *pVersion[2] = </div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;{</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    VERSION_S(<a class="code" href="b__config_8h.html#ac74274f3d1cd03778e223a3bedb3a13a">HW_VERSION</a>),</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    VERSION_S(<a class="code" href="b__config_8h.html#a80bd8a83eaaf4466b44c61321c39b11b">FW_VERSION</a>)</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;};</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___t_r_a_c_e___exported___functions.html#ga4572a73195a68b791b9e25028ed0e360">bTraceInit</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *pfw_name)</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;{</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    cm_backtrace_init(pfw_name, pVersion[0], pVersion[1]);</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;}</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group___t_r_a_c_e___exported___functions.html#ga9e714a0cb8c5a2ff9d175dba8a938bf4">bHardfaultCallback</a>()</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;{</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    uint32_t call_stack[16] = {0};</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    cm_backtrace_call_stack(call_stack, <span class="keyword">sizeof</span>(call_stack), cmb_get_sp());</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;}</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="comment">/************************ Copyright (c) 2019 Bean *****END OF FILE****/</span></div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div><div class="ttc" id="b__config_8h_html_a80bd8a83eaaf4466b44c61321c39b11b"><div class="ttname"><a href="b__config_8h.html#a80bd8a83eaaf4466b44c61321c39b11b">FW_VERSION</a></div><div class="ttdeci">#define FW_VERSION</div><div class="ttdef"><b>Definition:</b> <a href="b__config_8h_source.html#l00053">b_config.h:53</a></div></div>
<div class="ttc" id="group___t_r_a_c_e___exported___functions_html_ga9e714a0cb8c5a2ff9d175dba8a938bf4"><div class="ttname"><a href="group___t_r_a_c_e___exported___functions.html#ga9e714a0cb8c5a2ff9d175dba8a938bf4">bHardfaultCallback</a></div><div class="ttdeci">void bHardfaultCallback(void)</div></div>
<div class="ttc" id="b__trace_8h_html"><div class="ttname"><a href="b__trace_8h.html">b_trace.h</a></div></div>
<div class="ttc" id="b__config_8h_html_ac74274f3d1cd03778e223a3bedb3a13a"><div class="ttname"><a href="b__config_8h.html#ac74274f3d1cd03778e223a3bedb3a13a">HW_VERSION</a></div><div class="ttdeci">#define HW_VERSION</div><div class="ttdef"><b>Definition:</b> <a href="b__config_8h_source.html#l00050">b_config.h:50</a></div></div>
<div class="ttc" id="group___t_r_a_c_e___exported___functions_html_ga4572a73195a68b791b9e25028ed0e360"><div class="ttname"><a href="group___t_r_a_c_e___exported___functions.html#ga4572a73195a68b791b9e25028ed0e360">bTraceInit</a></div><div class="ttdeci">int bTraceInit(const char *pfw_name)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
